1. Field of the Invention
The present invention relates generally to an improved data processing system. More specifically, the present invention relates to a method and apparatus for correcting data errors prior to execution of a series of instructions in the data processing system.
2. Description of the Related Art
A register in a data processing system often includes data errors in the data entries stored in the register. Typically, data is stored as multiple series of bits. A bit is a digit with an assigned value of either 0 or 1. Bits are combined together into a series to represent an individual data value. For example, a data value of ‘A’ is denoted by the binary value of ‘01000001,’ and the data value of ‘4’ is denoted by the binary value of ‘00000100.’
Errors exist in a register when a bit is the wrong binary value. In other words, an error exists when a bit is supposed to be a 0 but is showing as a 1, or when the bit is supposed to be a 1 but is showing as a 0. The bit error can be temporary or permanent. An error is temporary if the error occurs only once, such as when a data power system experiences a power surge and causes a bit to flip values. Thus, for example, a temporary error occurs when a bit flips from a 0 to 1 when an instruction executes. An error is permanent if the bit becomes stuck on a particular value. For example, a bit is supposed to have a value of 0, but the bit always shows a 1 when an instruction executes. A permanent error can exist if the register in which the bit is saved is corrupted. In such a situation, the error cannot be corrected using software.
Several solutions currently exist that allow a data processing system to correct these types of data errors. The solutions typically include the added benefit of correcting the error while minimizing the impact on processor speeds. One such solution detects data errors in the source data in parallel with executing an instruction on the source data.
Source data is data used to execute an instruction. Target data is the data resulting from the execution of the instruction. Source data and target data are stored in a register file, which is a database of information. A register file is made up of a number of registers or entries. An instruction draws source data from a register file and writes target data to the register file. In a register file, the source data and target data are each saved in a particular location in the register file, also known as an address in the register file.
In the currently used solutions, the target data is prevented from saving in the register file if an error is detected in the source data. Instead, if an error is detected in the source data, the source data is corrected and written back to the register file at the original address for the source data instead of at the address for the target data. The instruction that used the incorrect source is flushed, and the instruction is re-executed using the corrected source data. Once the process of correcting, flushing, and re-executing the instruction is completed, the target data is written into the register file.
The currently used solutions, however, have a number of drawbacks. First, the speed with which target data is written into a register file is reduced in order to accommodate the error correction process. Instead of receiving target data from a single source, the described solution has target data that originates from the normal execution path and from an error correction path. As a result, in order to accommodate both paths, the process for writing to the register file is slowed down. Ultimately, the reduced speed with which target data is written to the register file also affects the overall speed of executing the entire process. Additionally, extra bypass stages may be required to accommodate the execution of the error correction process. The extra bypass stages introduce additional physical wires and complexity into the processor.
Furthermore, the currently used solutions only resolve temporary, not permanent, bit errors. If a register is corrupted, the register will not allow corrected data to be written correctly in the register. The register will only allow data that has an error to be written into the register. Therefore, even if the source data is corrected again in the current solution, incorrect data will be written into the register file because the register file will only allow incorrect data to be written.
Moreover, these currently used solutions do not allow for the simultaneous correction of errors in multiple source data because all processes are managed by a single error correction process. In other words, each time an error is identified in the source data, the error correction process can only execute for the source data with the identified error. If other source data also have errors, the error correction process cannot process the other source data until the processor completes the error correction process for the first set of data. As a result, the completion of the overall process is delayed until all errors in all the source data are identified and fixed.
In addition, the currently used solution only addresses errors in data where the data also includes an error correction mechanism, such as error correcting code. Typically, data errors are identified in two ways: (1) using a scheme that only identifies the existence of an error, as in a parity bit scheme, or (2) using a scheme that both identifies and modifies the data so that the error is corrected, as in an error-correction code (ECC) scheme. The currently used solutions only address situations that both identify and modify the data and do not address data errors that are only identified in the data.